xen/arm: introduce XENFEAT_grant_map_identity
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 1 Aug 2014 14:45:25 +0000 (15:45 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 9 Sep 2014 10:47:09 +0000 (11:47 +0100)
commit8d09ef6906ca0a9957e21334ad2c3eed626abe63
tree7cdab75b08bf76f465a349a3814a6e2457de15b3
parente25a5f4d8cf3b55718048abdd21c7d0de64ae54c
xen/arm: introduce XENFEAT_grant_map_identity

The flag specifies that the hypervisor maps a grant page to guest
physical address == machine address of the page in addition to the
normal grant mapping address.

Frontends are allowed to map the same page multiple times using multiple
grant references. On the backend side it can be difficult to find out
the physical address corresponding to a particular machine address,
especially at the completion of a dma operation. To simplify address
translations, we introduce a second mapping of the grant at physical
address == machine address so that dom0 can issue cache maintenance
operations without having to find the pfn.

Call arch_grant_map_page_identity and arch_grant_unmap_page_identity
from __gnttab_map_grant_ref and __gnttab_unmap_common to introduce the
second mapping if the domain is directly mapped. To do so we also need
to change gnttab_need_iommu_mapping to just be defined as
is_domain_direct_mapped on arm.

Remove arm_smmu_map_page and arm_smmu_unmap_page as they have become
unused.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
xen/common/grant_table.c
xen/common/kernel.c
xen/drivers/passthrough/arm/smmu.c
xen/include/asm-arm/grant_table.h
xen/include/public/features.h